﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Dissemination.MVC.Models.TargetArea>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <asp:Literal runat="server" Text="<%$ Resources:Literals, ApplicationTitle%>" /> &middot; <%= Model.TargetAreaCode%> details
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="BreadcrumbContent" runat="server">
    <%= Html.ActionLink(Model.Program.ProgramName, "Details", "Program", new { id = ViewContext.RouteData.Values["programid"] }, null)%> &gt; <%= Html.Encode(Model.TargetAreaCode)%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="edit_own">
        <%= Html.ActionLink("Edit TA details", "Edit", new { id = ViewContext.RouteData.Values["id"], programID = ViewContext.RouteData.Values["programid"] })%>
    </div>
    <h1> <%= Html.Encode(Model.TargetAreaCode)%> details</h1>
    <fieldset id="ta_details">
        <div class="flota">
            <%= Html.Encode(Model.Country.CountryName) %></div>
        <div class="flota">
            <%= Html.Encode(Model.TargetAreaCode) %></div>
        <div>
            <%= Html.Encode(Model.TargetAreaCenter) %></div>
    </fieldset>
    <fieldset id="ta_reporters">
        <legend>Reporters</legend>
        <ul class="elements-list">
            <li class="first">
                <div class="cell110 flota">
                    Name</div>
                <div class="cell200 flota">
                    Surname</div>
                <div class="cell350 flota">
                    E-mail</div>
                <div class="flota_der">
                    Actions</div>
            </li>
            <% foreach (var item in Model.Reporters)
               { %>
            <li>
                <div class="cell110 flota">
                    <%=Html.Encode(item.ReporterName)%>
                </div>
                <div class="cell200 flota">
                    <%= Html.Encode(item.ReporterSurname)%></div>
                <div class="cell300 flota">
                    <a href="mailto:<%= Html.Encode(item.ReporterEmail)%>" title="send mail" class="mailto">
                        <%= Html.Encode(item.ReporterEmail)%></a></div>
                <div class="enlaces flota_der">
                    <%= Html.ActionLink("VIEW", "Details", "Reporter", new { id = item.ReporterID, targetAreaID = ViewContext.RouteData.Values["id"] }, null)%>
                    <%= Html.ActionLink("Edit", "Edit", "Reporter", new { id = item.ReporterID, targetAreaID = ViewContext.RouteData.Values["id"] }, null)%>
                    <%= Html.ActionLink("Reset PW", "ResetPassword", "Reporter", new { id = item.ReporterID, targetAreaID = ViewContext.RouteData.Values["id"] }, null)%>
                </div>
            </li>
            <% } %>
        </ul>
        <p class="enlaces">
            <%= Html.ActionLink("Create new Reporter", "Create", "Reporter", new { targetAreaID = ViewContext.RouteData.Values["id"] }, null)%>
        </p>
    </fieldset>
    <div class="navigation">
        <p class="flota">
            <%= Html.ActionLink("REPORTER AREA", "TargetArea", "ReporterManager", new { id = ViewContext.RouteData.Values["id"] }, null)%>
        </p>
        <p>
            <%= Html.ActionLink("Back to program", "Details", "Program", new { id = ViewContext.RouteData.Values["programid"] }, null)%></p>
        <div class="limpia">
        </div>
    </div>
</asp:Content>
